import request from '@/utils/request'
//获取该课程的小组
export function getAllGroupsAPI(courseId) {
    return request({
        url: '/groups/getByCourseId/' + courseId,
        method: 'GET',
    })
}
//获取组信息接口
export function getGroupsAPI(groupId) {
    return request({
        url: '/groups/' + groupId,
        method: 'GET',
    })
}
//编辑组
export function addGroupsAPI(data) {
    return request({
        url: '/groups' ,
        method: 'POST',
        data
    })
}
//编辑组
export function editGroupsAPI(groupId,data) {
    return request({
        url: '/groups/' +  groupId,
        method: 'PUT',
        data
    })
}

//删除小组
export function deleteGroupsAPI(groupId) {
    return request({
        url: '/groups/' + groupId,
        method: 'DELETE',
    })
}
